<html>
	<head>
		<meta charset="UTF-8">
		<title>设置对比范围</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<link rel="stylesheet" href="../../layui/css/layui.css" />
		<link rel="stylesheet" href="../../css/bass.css" />
		<style>
			.layui-form-checkbox[lay-skin=primary]{
				height:30px !!important ; 
			}
			.layui-form-checkbox span{
				height: 30px;
			}
		</style>
	</head>

	<body>
		<div class="body">
			<!--与昨天的对比范围-->
			<div class="layui-row" id="">
				<div class="layui-col-md10">
					<form class="layui-form mt20" id="tijiaoForm">
						<div class="layui-form-item">
							<label class="layui-form-label pl30">与昨天的对比范围：</label>
							<div class="layui-input-block">
								<input type="text" id="date" name="data" class="layui-input w200" value="">
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-input-block">
								<button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="submitTijiao">提交</button>
							</div>
						</div>
					</form>
				</div>
			</div>
			<!--与昨天的对比范围-->
			
		</div>
		<script src="../../js/common/jquery-1.11.3.min.js"></script>
		<script src="../../layui/layui.js"></script>
		<script src="../../js/common/navList.js"></script>
		<script src="../../js/common/ajax.js"></script>
		<script src="../../js/common/data.js"></script>
		<script>
		layui.use(['table', 'laydate', 'form','layer'], function(){
			var form = layui.form,table = layui.table,laydate = layui.laydate;

			//提交
			form.on('submit(submitTijiao)', function(data) {
				//获取当前选中的checkbox的值
				var checkboxdatas=$('input[name=siteName]:checked');
				var siteNames="";
				$.each(checkboxdatas,function(){
					siteNames+=$(this).attr('title')+",";
				});
				siteNames=siteNames.substring(0,siteNames.length-1);
				console.log(siteNames);
				
				if(siteNames!="" && siteNames!=null){
					ajaxPost({
						url:baseUrl+ '/monitordata/submitConfirmData',
						type: "POST",
						data: {
							siteType: siteType,
							siteNames:siteNames
						},
						dataType: "json",
						successFull: function(res) {
							console.log(res)
							layer.msg('提交成功', {icon: 6});
							window.location.href = "./storeMoniterList.html";
						},
						errCallBack: function(res) {
							layer.msg(res.msg, {icon: 6});
						}
					})
				}
			});
		});
		</script>
	</body>
</html>